#ifndef MATTISEMESSAGING_H
#define MATTISEMESSAGING_H

// Received message data
struct RecvMsgData {
	int msgcode;
	int len;
};

// Sends a message
int mattiseSendMessage( int destpid, int msgcode, char* msgbuff, int len );

// Allocates a buffer for a received message
char* mattiseAllocMessage();

// Allocates a buffer for sending a message
char* mattiseAllocMessageSz( int sz );

// Gets the size of the next message in the queue
int mattiseGetMessageSize();

// Frees a message buffer
void mattiseFreeMessage( char* tmp );

// Checks for a message
int mattiseHasMessage();

// Receives a message
char* mattiseRecvMessage( struct RecvMsgData* dat );

#endif
